<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=3,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<title>评价反馈</title>
	<link href="../css/mui.min.css" rel="stylesheet">
	<link href="../css/mui.picker.min.css" rel="stylesheet">
	<link href="css/public/reset-html5.css" rel="stylesheet">
	<link href="css/wx-main.css?20161108_1" rel="stylesheet">
	<link rel="stylesheet" href="css/recycle_order.css">
	<link href="../css/mui.min.css" rel="stylesheet">
	<style>
		body{
			font-size:13px;
		}
		input{
			margin:0!important;
		}
	</style>
</head>
<body class="body-bg" id="main" ng-app="APP" ng-controller="appController">
<form novalidate name="orderForm">
	<table>
		<tr>
			<td>反馈类型</td>
			<td>
				<select ng-model="type" required>
					<option value="0">建议</option>
					<option value="1">投诉</option>
				</select>
			</td>
		</tr>
		<tr>
			<td style="vertical-align: top;">反馈内容</td>
			<td><textarea  ng-model="content" rows="3" required></textarea></td>
		</tr>
	</table>
	<div class="text-center text-color2 order-btn">
		<button ng-disabled="orderForm.$invalid" ng-click="sumbit()"
		        class="primary-bg text-color2 btn"
		        style="margin:40px 0;width:100%;">提交</button>
	</div>
</form>
</validator>

</body>
<script src="../js/jquery-2.2.1.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/phone.js"></script>
<script src="js/public/mui.min.js"></script>
<script src="layer_mobile/layer.js"></script>
<script>
	angular.module("APP", []).controller("appController", ['$scope', function($scope){
		$scope.type = '0';
		$scope.sumbit  = function(){
			var index = layer.open({type: 2,shadeClose:false});
			$.post(apiRecycle+"index.php/Home/Index/feedback", {
				type:$scope.type,
				content:$scope.content
			}, function(res){
				if(res.code==200){
					mui.toast('反馈提交成功',{type:'div'});
					setTimeout(function(){location.href="index.html"}, 2000);
				} else {
					mui.toast(res.message, {type:'div'});
				}
				layer.close(index);
			}, "json");
		}
	}]);
</script>
</html>